package StrategyMode.version4;

/**
 * Created by ycq on 2018/10/18.
 */
public class Context {

    Strategy strategy;

    //初始化时，通过构造器传入具体的策略对象
    public Context(Strategy strategy){
        this.strategy=strategy;
    }
    //上下文接口
    //根据具体的策略对象，调用其算法的方法
    public void ContextInterface(){
        strategy.AlgorithmInterface();
    }
}
